package com.aya.aspect;

import com.aya.mapper.model.ChildBean;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CustomBeanPostProcessor implements BeanPostProcessor {

    @Resource
    ChildBean childBean;
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("childBean-beanPostProcessor:"+childBean);
        return bean;
    }
}
